put space & Space & peekbyte(address,L) after field "data"
put last word of field "data" into address
end repeat
put return & return & "Click Mouse to Exit Demo" after field "data"
wait until the mouseclick
hide field "data"
end mouseUp
-- part contents for card part 46
----- text -----
Ask your dealer for the name of a Macintosh user group near you. If you live in the United States, you can call (800) 538-9696 for the name, address, and phone number of up to three Macintosh user groups in your geographical area.
Outside the United States, ask your dealer to get in touch with:
The Boston Computer Society Berkeley Macintosh User Group
One Center Plaza 1442-A Walnut Street #62
Boston, MA 02108 Berkeley, CA 94709
(617) 367-8080 (415) 849-9114
Either of these organizations can provide you with the name of a Macintosh user group near you. You can also join either of these groups or ask them for information on starting your own Macintosh user group.
-- part contents for background part 68
----- text -----
Peekbyte returns the unsigned byte stored at a given address. This value is represented in hexadecimal, but you may use the HexToDec XFCN provided in this stack to convert the value to a decimal if you wish.
A typical useage of peekbyte would be:
put peekbyte("411000") into temp
On the Mac Plus, this would put the value 4C into the variable temp.
As an option, you may include a second parameter with the peekbyte XFCN. If peekbyte detects a second parameter, it returns a 2-line result that consists of the byte stored at the given address in the first line and the next viable address (the original address + 1) in the second line. This option provides a simple and effective way to use peekbyte in a script to peek into a range of addresses.
See the script of the demo button on this card for an example.
The address provided to peekbyte may be even or odd.